package cn.ywang;

import cn.ywang.register.RegisterCenter;
import cn.ywang.server.Server;
import cn.ywang.service.HelloImpl;
import cn.ywang.service.IHello;

/**
 * Hello world!
 */
public class ServerApp {
	public static void main(String[] args) {
		try {
			RegisterCenter registerCenter = new RegisterCenter();
			IHello hello = new HelloImpl();
			Server server = new Server(registerCenter, "127.0.0.1:8888");
			server.bind(hello);
			server.publisher();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
